package com.org.sort;

@SuppressWarnings("serial")
public abstract class AbConcurrentArrySort<T> extends ConcurrentSort<T> {
    protected T[] array;

    protected AbConcurrentArrySort(T[] array) {
        this(array, 0x10);
    }

    protected AbConcurrentArrySort(T[] array, int threadloads) {
        this(array, 0, array.length - 1, threadloads);
    }

    protected AbConcurrentArrySort(T[] array, int began, int end, int threadloads) {
        this.array = array;
        this.began = began;
        this.end = end;
        this.threadloads = threadloads;
    }

    protected void swap(int posOne, int posTwo) {
        if (posOne != posTwo) {
            T temp = array[posOne];
            array[posOne] = array[posTwo];
            array[posTwo] = temp;
        }
    }

    protected T getValueIndex(int index) {
        return array[index];
    }
}
